Correcting typos
parent
98c4432d9c
commit
b58aba1b31
7
main.cpp
7
main.cpp
|
|
@ -26,14 +26,14 @@ template<int keep_every_x_days,int till_y_day>std::set<boost::posix_time::ptime>
|
|||
while( ct != times.rend() && (dur = now - *ct).hours() <= till_y_day * 24)
|
||||
{
|
||||
last_kept_time = *ct;
|
||||
std::cout << "Keeping Backup " << last_kept_time << " of this day." << std::endl;
|
||||
std::cout << "Keeping Backup " << last_kept_time << " of this day." << std::endl << std::endl;
|
||||
ct++;
|
||||
|
||||
while( ct != times.rend() && (dur = last_kept_time - *ct).hours() < keep_every_x_days * 24)
|
||||
{
|
||||
if(ct == --times.rend())
|
||||
{
|
||||
std::cout << "Keeping last Backup " << *ct << " in this backup-set." << std::endl;
|
||||
std::cout << "Keeping last Backup " << *ct << " in this backup-set." << std::endl << std::endl;
|
||||
return ct++;
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ int main(int, char**){
|
|||
asio::io_context ctx;
|
||||
asio::readable_pipe out(ctx);
|
||||
|
||||
bp::process proc(ctx, bp::environment::find_executable("zfs"), {"list", "-t snaphot", "/backup/workstation"}, bp::process_stdio{{/* in to default*/}, out, {/* err to default */}});
|
||||
bp::process proc(ctx, bp::environment::find_executable("zfs"), {"list", "-t", "snapshot", "/backup/workstation"}, bp::process_stdio{{/* in to default*/}, out, {/* err to default */}});
|
||||
|
||||
std::string output;
|
||||
|
||||
|
|
@ -174,6 +174,7 @@ int main(int, char**){
|
|||
std::cout << "Omitting Backup " << *current_time << " because it is too young to handle (" << dur.hours() << " hours old)." << std::endl;
|
||||
current_time++;
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
current_time = handle_backups_after_one_day(snapshotbase, times, current_time, now);
|
||||
current_time = handle_backups_after_30_days(snapshotbase, times, current_time, now);
|
||||
|
|
|
|||
Loading…
Reference in New Issue